今天是練習cpe的Hartals題目
##程式碼
#include <bits/stdc++.h>
using namespace std;
int main()
{
int T;
cin >> T;
while(T--)
{
int N, P, h;
cin >> N;
cin >> P;
int days[N+1]={};
int total = 0;
for (int i = 0 ;i < P ;i++)
{
cin >> h;
for (int j = h;j <= N ;j+=h)
{
if (j % 7 == 6 || j % 7 == 0)
{
continue;
}
if (days[j] == 0)
{
total++;
days[j] = 1;
}
}
}
cout << total << endl;
}
return 0;
}